-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Address tutorial feedback #51518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Address tutorial feedback #51518
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request addresses all feedback points from issue #51310 regarding the C# interpolated string handler tutorial. The changes improve the tutorial by adding missing implementation details, clarifying behaviors, and simplifying examples.
Changes:
- Added implementation for
AppendFormattedwith alignment and format parameters - Replaced custom
GetFormattedText()method with standardToString()override in all logger versions - Added documentation notes about constant interpolated strings and empty
InterpolatedStringHandlerArgumentAttributebehavior - Simplified the side-effects demonstration from 5 increments to 1 increment per loop iteration
- Updated target framework from net8.0 to net10.0
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| logger-v4.cs | Added AppendFormatted overload with alignment parameter and replaced GetFormattedText with ToString override |
| logger-v3.cs | Replaced GetFormattedText with ToString override |
| Logger-v2.cs | Replaced GetFormattedText with ToString override |
| Version_4_Examples.cs | Simplified side-effects example to use single increment instead of five |
| interpolated-string-handler.md | Added two notes explaining constant interpolated string behavior and empty attribute behavior; updated expected output |
| interpolated-string-handler.csproj | Updated TargetFramework from net8.0 to net10.0 |
docs/csharp/advanced-topics/performance/interpolated-string-handler.md
Outdated
Show resolved
Hide resolved
docs/csharp/advanced-topics/performance/interpolated-string-handler.md
Outdated
Show resolved
Hide resolved
docs/csharp/advanced-topics/performance/interpolated-string-handler.md
Outdated
Show resolved
Hide resolved
Fixes dotnet#51310 Address all the comments in this issue.
Do a full proofread and style check.
411ce95 to
4a06cdd
Compare
Fixes #51310
Address all the comments in this issue.
While in this file, perform a general edit pass.
Internal previews